package groupware.board.controller;

import groupware.board.service.NoticeService;
import groupware.board.vo.NoticeVO;

import java.sql.SQLException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.multiaction.MultiActionController;



public class NoticeController extends MultiActionController{
	private NoticeService noticeService;

    
	public void setNoticeService(NoticeService noticeService) {
		this.noticeService = noticeService;
	}


	public ModelAndView insertNotice(HttpServletRequest request,
			HttpServletResponse response,NoticeVO vo) throws Exception{
		ModelAndView mv=new ModelAndView();
		System.out.println("hihihihihihih");
		try{
		    noticeService.insertContent(vo); 
			//mv.addObject("info", "registerOK!!");
		}catch(SQLException se){
			//mv.addObject("info", se.getMessage());
			se.printStackTrace();
		}
		mv.setViewName("group/g_notice_board_list");
		return mv;
	}	
}
